Is there a java library equivalent to `file` command in unix

Posted by Shervin on Stack Overflow See other posts from Stack Overflow or by Shervin
Published on 2010-04-28T11:38:05Z Indexed on 2010/04/28 11:43 UTC
Read the original article Hit count: 227

Filed under:
|
|
|

Is there any java libraries that is similar to unix's command file?

ie:

$ file somepicture.png
somepicture.png PNG image, 805 x 292, 8-bit/color RGB, non-interlaced

The file command is such a nice tool. I need something that can tell me if the file is really what I want it to be. (ie a picture, document etc)

I know I can run the command file, but I am looking for a java library, not running the actual unix command.

© Stack Overflow or respective owner

Related posts about java

Related posts about unix